Location: SDK\Samples\Classic ASP\Ad Sitelet
The primary goal of the Advertising Sitelet is to demonstrate the use and behavior of the components that work together to display advertisements in a Commerce Server site. In this sitelet, you will view a demonstration of targeted advertisements for hard-coded profile data to learn and understand how the ContentSelector object works. The profile data for this sitelet is stored in the site SQL Server database; this database is populated by Commerce Server Site Packager during the sitelet installation process.
The Advertising Sitelet consists of a package file, which you unpack using Commerce Server Site Packager. The source code for the sitelet is included in this package. Using the sitelet, you can create and display ads using the Campaign Manager module, and you can manage ad targeting based on profiles in your Profiles database. No modification to the source code is required to deploy the Advertising Sitelet to a server running Commerce Server 2002.
Best coding practices are maintained in this sample, and the code represents the prescribed method of using the object model.
ASP-Based Advertising Sitelet Code Notes
Installing the ASP-Based Advertising Sitelet
This sitelet demonstrates multilingual functionality. The following languages are supported: English, French, German, and Japanese. The sitelet sets the language character sets in the Main routine of several ASP pages using code such as the following:
Sub Main()
Set g_ojbMsgMgr = Application ("MSCSMessageManager")
Response.CharSet = "iso-8859-1"
End Sub
Notes
You unpack the Advertising Sitelet using Commerce Server Site Packager. The package file for the ASP version of the Advertising Sitelet is located in the following directory:
<drive>:\Program Files\Microsoft Commerce Server 2002\SDK\Samples\Classic ASP\Ad Sitelet\SDK-AD-SITELET.PUP
Use the following procedure to install the Advertising Sitelet on one computer using the Quick mode in Site Packager.
Unpacking the ASP-based Advertising Sitelet using the Custom unpack option and creating independent databases for each of the site resources is not recommended.